#include<iostream>
#include<map>
using namespace std;
map<string, int>mp;
int main()
{
	mp["elephant"] = 4;
	mp["tiger"] = 3;
	mp["cat"] = 2;
	mp["mouse"] = 1;
	string s1, s2;
	cin >> s1 >> s2;
	if (mp[s1] >= mp[s2]) {
		cout << "tiangou yiwusuoyou" << endl;
	}
	else {
		cout << "tiangou txdy" << endl;
	}
	return 0;
}